package com.bifrost.config;


import com.bifrost.core.ApiGateWayServlet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.DispatcherServlet;

/**
 * @author rangf
 * @date 2018/2/6
 */
//@Configuration
//@ServletComponentScan
public class ApiGatewayConfig {

    @Autowired
    private DispatcherServlet dispatcherServlet;
    @Bean
    public ServletRegistrationBean apiServlet() {
        ServletRegistrationBean bean = new ServletRegistrationBean(new ApiGateWayServlet(),"/admin/");
        return bean;
    }
}
